Stable, flexible, peephole pretty-printing

نویسندگان

  • Stoney Jackson
  • Premkumar T. Devanbu
  • Kwan-Liu Ma
چکیده

Programmers working on large software systems are faced with an extremely complex, information-rich environment. To help navigate through this, modern development environments allow flexible, multi-window browsing and exploration of the source code. Our focus in this paper is on pretty-printing algorithms that can display source code in useful, appealing ways in a variety of styles. Our algorithm is flexible, stable, and peephole-efficient. It is flexible in that it is capable of screenoptimized layouts that support source code visualization techniques such as fisheye views. The algorithm is peephole-efficient, in that it performs work proportional to the size of the visible window and not the size of the entire file. Finally, the algorithm is stable, in that the rendered view is identical to that which would be produced by formatting the entire file. This work has 2 benefits. First, it enables rendering of source codes in multiple fonts and font sizes at interactive speeds. Second, it also allows the use of powerful (but algorithmically more complex) visualization techniques (such as fish-eye views), again, at interactive speeds. We have built a pretty-printing plug-in for Eclipse that allows the use of sophisticated formatting techniques, including such features as multiple fonts and fish-eye views. Our incremental algorithm enables this plug-in to produce readable layouts (without ugly line-wrapping) within a wide range of window sizes, at interactive speeds.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Software ENgineering Pretty-printing for software reengineering

CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acronyms. 1. INTRODUCTION Software reengineering is concerned with changing and repairing existing software systems. Software reengi-neering is often language dependent and customer specific. For instance, Dutch banks have to standardize their bank...

متن کامل

Pretty-printing for Software Reengineering Sen Software Engineering

CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acronyms. 1. INTRODUCTION Software reengineering is concerned with changing and repairing existing software systems. Software reengi-neering is often language dependent and customer specific. For instance, Dutch banks have to standardize their bank...

متن کامل

Pretty Printing with Delimited Continuations

Pretty printing is the task of nicely formatting tree structured data within a given line width limit. In 1980 Oppen published a pretty printing algorithm that takes time linear in the size of the input, independent of the line width, and uses only limited look-ahead. This work inspired the development of a number of purely functional pretty printing libraries in Haskell. Here I present a new f...

متن کامل

Programmatic Building of Models Just for Pretty Printing

In-memory object models of programs are commonly built by tools to facilitate program analysis and manipulation. We claim that for some applications it makes sense to construct such models for the sole purpose of pretty printing, and explain the reasoning behind our claim in this paper. We also describe a tool we have created to support this approach to pretty printing; the tool derives, from a...

متن کامل

Infinite Pretty-printing in eXene

We describe the design and implementation of a Standard ML of New Jersey library for the interactive pretty-printing of possibly infinite syntax trees. The library handles elision in a novel way, and is implemented using Concurrent ML and the eXene X Window System toolkit. 1 Pretty-printing with Elision In the modern approach to pretty-printing, as developed by Oppen [Opp80] and others [Mik81, ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Sci. Comput. Program.

دوره 72  شماره 

صفحات  -

تاریخ انتشار 2008